#ifndef MAINWINDOWIMPL_H
#define MAINWINDOWIMPL_H
//
#include <QMainWindow>
#include <QString>
#include <QList>
#include <QUndoStack>
#include <QtGui>
#include "ui_mainwindow.h"
#include "variablestack.h"
//
class MainWindowImpl : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
public:
	MainWindowImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
	void ExecuteCommand(QString&);
	
private slots:
	void SlotExecuteCommand();
	
private:
	/******************************** 
	** Undo-redo framewok
	*/
	QUndoStack UDS;
		
	/*********************************
	** Stack Viewer
	*/
	VariableStack *Stack;
	QDockWidget *stackDock;
	
	
	/*********************************
	** Expression Solver
	*/
	void ErrorFromCode(int,QString S=NULL);
	double ComputeExpression(QString,bool&);
	double ComputeExpressionRPN(QString,bool&);
	double SolveStack(QList<QString>,QList<QString>,bool&);
	bool isExpression(QString E);
};
#endif




